CREATE TABLE [dbo].[cmsWorkFlow](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[uid] [uniqueidentifier] NOT NULL,
	[documentid] [int] NOT NULL,
	[groupid] [int] NOT NULL,
	[stateid] [int] NOT NULL,
	[completed] [bit] NOT NULL,
	[userid] [int] NOT NULL,
	[datetimestarted] [datetime] NOT NULL,
	[datetimeupdated] [datetime] NOT NULL,
 CONSTRAINT [PK_cmsWorkFlow] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[cmsWorkFlow] ADD  CONSTRAINT [DF_cmsWorkFlow_completed]  DEFAULT ((0)) FOR [completed]
GO

ALTER TABLE [dbo].[cmsWorkFlow] ADD  CONSTRAINT [DF_cmsWorkFlow_datetimestated]  DEFAULT (getdate()) FOR [datetimestarted]
GO

ALTER TABLE [dbo].[cmsWorkFlow] ADD  CONSTRAINT [DF_cmsWorkFlow_datetimeupdated]  DEFAULT (getdate()) FOR [datetimeupdated]
GO

